package com.qidian.mes.sys.controller;

import com.github.pagehelper.PageInfo;
import com.qidian.mes.pojo.Role;
import com.qidian.mes.sys.service.RoleService;
import com.qidian.mes.util.pojo.QdResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Author: 戴着假发的程序员
 * Date: 2024-04-17 12:09
 * company: 起点编程
 **/

@RestController
@CrossOrigin
@RequestMapping("/role")
public class RoleController {
    @Autowired
    private RoleService roleService;

    @GetMapping("/list")
    public QdResult<PageInfo<Role>> list(@RequestParam(defaultValue = "1")int page,@RequestParam(defaultValue = "10")int limit,Role role){
        return roleService.selectByPage(page,limit,role);
    }
}
